package com.bjpowernode.security06jwtredismysql.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 用户Controller
 */
@RestController
public class UserController {


    @PreAuthorize("hasAuthority('user:query')")
    @GetMapping("user")
    public String queryUser() {
        return "查询成功";
    }
}
